<!doctype html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>剔除关键字管理</title>
    <link rel="stylesheet" type="text/css" href="/webapp/css/easyui.css">
    <link rel="stylesheet" type="text/css" href="/webapp/css/icon.css">
    <link rel="stylesheet" type="text/css" href="/webapp/css/color.css">
    <link rel="stylesheet" type="text/css" href="/webapp/css/public.css">
    <script type="text/javascript" src="/webapp/js/lib/jquery.min.js"></script>
    <script type="text/javascript" src="/webapp/js/lib/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/webapp/js/lib/jquery.global.settings.js"></script>
    <script type="text/javascript" src="/webapp/js/lib/ajaxfileupload.js"></script>
    <script type="text/javascript" src="/webapp/js/common/config.js"></script>
</head>
<body>
<div class="easyui-container-fluid">
    <div class="easyui-panel" style="border:none;">
        <div class="nav" id="nav"></div>
        <div class="easyui-panel" style="width: 100%;border:none;">
            <form id="ff">
                <div style="margin-bottom:20px;">
                    <label class="item-label">代码：</label>
                    <input type="text" name="code" class="easyui-textbox" style="width:100px;"/>
                    <label class="item-label">品类名称：</label>
                    <select id="categorySelect" name="categoryCode" class="easyui-combobox" style="width:100px;">
                    </select>
                    <label class="item-label">关键字：</label>
                    <input type="text" name="countent"  class="easyui-textbox" style="width:100px;"/>
                    <label class="item-label">状态：</label>
                    <input id="entityStatus" class="easyui-switchbutton" checked style="width:80px;height:30px;" onText="启用" offText="禁用"  >
                    <a class="easyui-linkbutton c8" style="width:80px;" href="javascript:void(0);" onclick="searchBy()">查询</a>
                </div>
            </form>
        </div>
        <div class="table-wrapper">
            <table id="datagrid" data-options="fitColumns:true,scrollbarSize:0">
                <thead>
                <tr>
                    <th data-options="field:'code',align:'center'" width="80">代码</th>
                    <th data-options="field:'categoryName',align:'center'" width="100">品类编号</th>
                    <th data-options="field:'countent',align:'center'" width="100">关键字内容</th>
                    <th data-options="field:'updateTime',align:'center'" width="150">修改时间</th>
                    <th data-options="field:'entityStatus',align:'center',formatter:statusFormatter" width="80">状态</th>
                    <th data-options="field:'action',align:'center',formatter:actions" width="180">操作</th>
                </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
    </div>
</div>
</body>
<script type="text/javascript">
    $(function() {
        initUserCategorySelect("categorySelect",function (code) {
            var categoryCode = getQueryParameter("categoryCode");
            if(categoryCode){
                // 其它页面跳过来传弟的值
                $("#ff").form("load", {'categoryCode': categoryCode});
            }
        });
        var height = $(window).height();
        var nav_height = $("#nav")._outerHeight();
        var ff_height = $("#ff").height();
        var table_height = height-nav_height-ff_height-40;
        $("#datagrid").css("max-height",table_height);
        $("#datagrid").datagrid({
            toolbar: [{
                text: '添加关键字',
                handler:function(){
                    window.parent.addTab("添加关键字","/webapp/pages/product/exclude/add.html");
                }
            }]
        });
        aRecords("剔除关键字","/webapp/pages/product/exclude/")
    });
</script>
<script type="text/javascript" src="/webapp/js/common/pagelist.js"></script>
<script type="text/javascript">
    function edit(id) {
        window.parent.addTab("添加关键字","/webapp/pages/product/exclude/add.html?id="+id);
    }
</script>
</html>
